package com.taxi.remote;

import com.taxi.request.PushRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

/**
 * @Author: aniu
 * @Date: 2023/10/9
 * @ClassName: ServiceSsePush
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@FeignClient("service-sse-push")
public interface ServiceSsePushClient {
    @PostMapping("/push")
    public String push(@RequestBody PushRequest pushRequest);

    @GetMapping("/connect")
    public SseEmitter connect(@RequestParam Long userId,@RequestParam String identity);
}
